import Vue from 'vue'
import VueRouter from 'vue-router'
import routes from './index'
Vue.use(VueRouter)

const router = new VueRouter({
    mode: 'hash',
    base: process.env.BASE_URL,
    routes
})

router.beforeEach(((to, from, next) => {
    document.title = to.meta.title || '孤寂无情的个人博客'
    next()
}))

export default router
